<!-- 用户咨询，报错，问答 -->	
<script type="text/javascript">
var tmp_hadsubmited = false;
function submitadvisory(){
	var pop_input_alert = $('#k_confirm_div').find('#pop_input_alert');
	pop_input_alert.text('');
	var pop_answer = $.trim($('#k_confirm_div').find('#pop_answer').val());
	if(pop_answer==''){
		pop_input_alert.text('请录入内容！');
		return;
	}
	//if(pop_answer.length>100){pop_input_alert.text('录入内容需小于100字符！');return;}
	tmp_hadsubmited = true;
	alert(pop_answer);
	$.kajax({      
		ajx_rtn_type:'JSON',
		url: "{:U('/Advisory/doanswer')}" ,      
		type:'post',
		data:{ 	answer_text:pop_answer
				,advid: "{$advisory['id']}"
			 },
		//async: false ,
		success: function(obj){ 
			tmp_hadsubmited = false;
			if(obj.status==1){
				k_success(obj.msg);
			}else{
				k_error(obj.msg);
			}
		}
	});
}

</script>
<div style="width:410px;" class="pop_form alL" id="k_confirm_div">
	<div class="c"></div>
	<div class="pop_form_li" style="margin-right:0px">
		<div style="text-align: center; margin:10px 15px">
			<span style="padding-top: 5px;vertical-align: top;">
			<php>if(in_array('suggest',array($advisory['sort_id']))){</php>
		    	建议
		    <php>}</php>
		    <php>if(in_array('question',array($advisory['sort_id']))){</php>
		    	疑问
		    <php>}</php>
		    <php>if(in_array('error',array($advisory['sort_id']))){</php>
		   		报错
		    <php>}</php>：</span>
			<textarea id="pop_question" class="normal_textarea" style="width:263px;height:60px;" readonly>{$advisory['question_text']}</textarea>
			<span id="pop_charcnt" name="pop_charcnt" style="padding: 0px 0 0 5px;color:blue" title="最多可录入100字">
				<span id="sms_input_no" style="font-size:16px;color:red; font-weight:bold">100</span>字
				</span>
		</div>
		<div style="text-align: center; margin:10px 15px">
			<span style="padding-top: 5px;vertical-align: top;">回答：</span>
			<textarea id="pop_answer" class="normal_textarea" style="width:263px;height:60px;">{$advisory['answer_text']}</textarea>
			<span id="pop_charcnt" name="pop_charcnt" style="padding: 0px 0 0 5px;color:blue" title="最多可录入100字">
				<span id="sms_input_no" style="font-size:16px;color:red; font-weight:bold">100</span>字
				</span>
		</div>
	</div>
	<div class="c"></div>
	<div class="answers" style="">
	<span style="color:red;float:left;font-weight:bold;margin:0px 0px 0px 8px;" id='pop_input_alert'></span>
	<input type="button" class="btn_ok" onclick="submitadvisory()" value="确定" id="k_confirm_btn">
	<input type="button" class="btn_cancel" onclick="ui.box.close()" value="取消" id="k_confirm_btn">
	</div>
</div>